#include "EventButton.hpp"

#include <iostream>
#include <glibmm/extraclassinit.h>

void
Event::Button::class_init(void *g_class, void *)
{
    g_return_if_fail(GTK_IS_WIDGET_CLASS(g_class));
    const auto klass = static_cast<GtkWidgetClass *>(g_class);
    gtk_widget_class_set_css_name(klass, "event-button");
}

Event::Button::Button()
    : Glib::ObjectBase("EventButton"), Glib::ExtraClassInit(Event::Button::class_init)
{
    std::cout << "Register Event::Button in GType System.\n";
}

Event::Button::Button(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builder> &refBuilder)
    : Glib::ObjectBase("EventButton"), Glib::ExtraClassInit(Event::Button::class_init)
    , Gtk::Button(cobject), m_refBuilder(refBuilder)
{
    this->signal_clicked().connect([]() { std::cout << "Clicked\n";});
}
